package com.jmp.api.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import one.stand.dto.PageResponse2;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author cjr
 */
@Data
@Builder
public class OrderListResponse {
    @ApiModelProperty(value = "订单列表，分页", dataType = "OrderListResponse.Order")
    private PageResponse2<Order> orderPage;

    @ApiModel("OrderListResponse.Order")
    @Data
    @Builder
    public static class Order {
        @ApiModelProperty("订单ID")
        private Integer orderId;
        @ApiModelProperty("订单价格")
        private BigDecimal orderPrice;
        @ApiModelProperty("订单状态: 1待支付 2待发货 3已发货 4已完成 5已取消 6退款申请 7退款完成")
        private Integer orderStatus;

        @ApiModelProperty("店铺LOGO")
        private String companyLogo;
        @ApiModelProperty("店铺ID")
        private Integer companyId;
        @ApiModelProperty("店铺名称")
        private String companyName;

        @ApiModelProperty(value = "商品列表", dataType = "OrderListResponse.Goods")
        private List<Goods> goodsList;

        @ApiModelProperty("是否可取消：1可取消")
        private Integer cancelFlag;
        @ApiModelProperty("是否可支付：1可支付")
        private Integer payFlag;
        @ApiModelProperty("是否可退款：1可退款")
        private Integer refundFlag;
        @ApiModelProperty("是否可取消退款：1可取消退款")
        private Integer refundCancelFlag;
        @ApiModelProperty("是否可提醒发货：1可提醒发货")
        private Integer remindSendFlag;
        @ApiModelProperty("是否可确认收货：1可确认收货")
        private Integer completeFlag;
    }

    @ApiModel("OrderListResponse.Goods")
    @Data
    @Builder
    public static class Goods {
        @ApiModelProperty("商品ID")
        private Integer goodsId;
        @ApiModelProperty("商品名称")
        private String goodsName;
        @ApiModelProperty("商品图片")
        private String goodsPhoto;
        @ApiModelProperty("SKU名称")
        private String skuName;
        @ApiModelProperty("SKU数量")
        private Integer skuNum;
        @ApiModelProperty("价格")
        private BigDecimal price;
    }
}
